cmake_minimum_required(VERSION 3.5.1)
project(boost_cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/xcmake)
#include("xcmake_env")
include("xcmake_tools")

set(CMAKE_BUILD_TYPE "Debug")


IF(UNIX)
	if(CMAKE_BUILD_TYPE STREQUAL "Debug")
	  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++11 -g -Wall -Wno-unused-variable -pthread -Wformat=0")
	else (CMAKE_BUILD_TYPE STREQUAL "Release")
	  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++11 -O2 -pthread -fopenmp -Wformat=0")
	endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
ELSEIF(WIN32)
	ADD_COMPILE_OPTIONS(/wd4800)
	ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
ENDIF()
 
MESSAGE(STATUS "Build Type:[\" ${CMAKE_BUILD_TYPE} \"][\" ${CMAKE_CXX_FLAGS} \"]")


INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

add_subdirectory(boost_cmake)
add_subdirectory(test)
